#ifndef __STDAFX_H__
#define __STDAFX_H__
#include "Common.h"
#ifdef _WIN32

#include <tchar.h>
#include <windows.h>
#include <winsock2.h>
#include <io.h>
#include <direct.h>
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "mysqlcppconn.lib")
#else

#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <asm/ioctls.h>

#include <pthread.h>
#include <semaphore.h>

#include <sys/io.h>
#include <errno.h>

#endif

#include <time.h>
#include <sys/stat.h>
#include <string.h>
#include <typeinfo>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <memory>
#include <boost/functional.hpp>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>

namespace std
{
	using namespace boost;
}

#ifndef _WIN32

namespace std
{
	using namespace __gnu_cxx;
}

typedef Int64 __int64;
typedef Int32 SOCKET;

#define _CrtCheckMemory(x)		(1)

#define strcpy_s				strcpy
#define sprintf_s 				sprintf
#define sscanf_s				sscanf
//#define auto_ptr				unique_ptr

#define _ASSERT(x)				assert(x)
#define MAX_PATH				512
#define SOCKET_ERROR			-1
#define INVALID_SOCKET			-1
#include <stdio.h>   
#include <stdarg.h>
#endif

#include <cppconn/driver.h>
#include <cppconn/exception.h>
#include <cppconn/resultset.h>
#include <cppconn/statement.h>
#include <cppconn/prepared_statement.h>
#include <cppconn/connection.h>

#include "Network.h"
#include "Config.h"
#include "DataBlock.h"
#include "PacketDecoder.h"
#include "PacketEncoder.h"
#include "PacketDispatcher.h"
#include "TimerHandler.h"
#include "TimerManager.h"
#include "Common.h"

#include "Const.h"
#include "CharInfo.h"
#include "Peer.h"
#include "PeerManager.h"
#include "DataServer.h"
#include "ServerCallbackData.h"
#include "Char.h"
#include "CharManager.h"
#include "Logger.h"
#include "ModulePlayer.h"
#ifdef _WIN32
#pragma comment(lib, "Common_d.lib")
#else
#pragma comment(lib, "Common.lib")
#endif

#endif


